'use strict';
const db = uniCloud.database();
exports.main = async (event, context) => {
	console.log('event : ', event)
	let status=2;
	let res_msg="";
	let body=event.body
	let body_json=JSON.parse(body)
	let _id=body_json._id
	const collection = db.collection('PetTemplate');

	let res = await collection.doc(_id).update({
		pre_id:body_json.pre_id,	
		ev_ids:body_json.ev_ids
	});
	res_msg="编辑成功"
	//返回数据给客户端
	return {"status":status,"res_msg":res_msg}
};
